package com.twu.biblioteca;

import java.util.Scanner;

public class InputHandler {

    Scanner standardInput;

    public InputHandler() {
        standardInput = new Scanner(System.in);
    }

    public int readOption() {
        String inputValue = "";

        inputValue = standardInput.next();

        if(!Character.isDigit(inputValue.charAt(0)))
            return -1;

        return Integer.parseInt(""+inputValue.charAt(0));
    }

    public String readSingleString() {
        String singleString = "";

        singleString = standardInput.next();

        return singleString;
    }
}
